{template '../Public/header'}
<script type="text/javascript" src="__PUBLIC__/Js/jquery.validate.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/jQuery.validate.message_cn.js"></script>
{template '../Public/nav'}
<div class="w990 clear">
        <div id="main">
            <div class="main_l">
                <div id="main_l_l" class="clear">
                    <h2 class="login_t">取回密码</h2>
                    <ul class="clear">
                    <form action="{echo reUrl('User/getpwd')}" method="post" name="login_form" id="login_form">
                    <table width="100%" border="0" class="login_form">
  <tr>
    <td width="100" align="right">帐号：</td>
    <td colspan="2"><input name="nick" id="nick" type="text" style="width:200px;" /></td>
  </tr>
  <tr>
    <td align="right">&nbsp;</td>
    <td width="150"><input type="submit" value="确定" name="commit" id="signup-submit" class="formbutton"></td>
    <td>&nbsp;</td>
  </tr>
</table>
<input name="_hash_" type="hidden" value="{$_hash_}" />
</form>
				</ul>
                </div>
            </div>
            <div class="main_r" style="width: 320px;">
    <ul class="sidebar">
            

        <li class="yellow">
            <h3>还没有{$_CFG['site_name']}帐号？</h3>
            <div class="sidebar_s clear">
            	<div class="sidebar_s_l">
                    <a class="signUp" href="{echo reUrl('User/reg')}"></a>
                </div>
            </div>
        </li>
   
             </ul>
</div>
        </div>
    </div>
<script type="text/javascript">
var g = '{GROUP_NAME}';
var m = '{MODULE_NAME}';
var a = '{ACTION_NAME}';
var u_index_url = "{echo reUrl('User/index')}";
var getpwd_url = "{echo reUrl('User/getpwd')}";
function editpwd()
{
	$.ajax({
		url: getpwd_url,
		type:"POST",
		cache: false,
		data:$("#login_form").serialize(),
		dataType:"json",
		error: function(){
			
		},
		success: function(result){
			if(result.status==1){
				alert(result.info);
				window.location.href = u_index_url;
			}else{
				alert(result.info);
			}
		}
	});
}
$(document).ready(function() {
			$("#login_form").validate({
						 submitHandler:function(form){
							 						editpwd();
							 						return false;
						 						}
						 });
			$('#nick').rules('add', {
						 		required: true,
								rangelength: [3,20]
						});
});
</script>
{template "../Public/footer"}